//
// File    : Answer.cs
// Author  : Dylan Gleason
// Class   : CST 336 - Junior Project
// Team    : Axial Computing, Inc.
// Project : Uncle Bob
//
// Answer represents a possible answer for each MultipleChoiceQuestion.
// There is only one correct answer for each MultipleChoiceQuestion, 
// which is denoted by a boolean value.
//

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Web;

namespace UncleBobWebService.Models
{
    [DataContract]  
    public class Answer
    {
        // constructor
        public Answer()
        {
        }

        // overloaded constructor
        public Answer(string answer, bool correct)
        {
            TheAnswer = answer;
            IsCorrect = correct;
        }

        // overloaded constructor
        public Answer(int id, string answer, bool correct)
        {
            ID = id;
            TheAnswer = answer;
            IsCorrect = correct;
        }

        [DataMember]
        public int ID
        {
            get;
            set;
        }

        //
        // TheAnswer represents the actual string representation
        // of the answer to a given question.
        //
        [DataMember]
        public string TheAnswer
        {
            get;
            set;
        }

        //
        // IsSelected is a flag to determine whether this answer
        // is selected by the user for the given question.
        //
        [DataMember]
        public bool IsSelected
        {
            get;
            set;
        }

        //
        // IsCorrect is a flag to determine whethe this answer
        // is the correct answer for the given question.
        //
        [DataMember]
        public bool IsCorrect
        {
            get;
            set;
        }
    }
}

